package com.cy.pj.sys.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysRoleMenuDao {

     /**基于菜单id执行关系数据的删除*/
     @Delete("delete from sys_role_menus where menu_id=#{menuId}")
     int deleteObjectsByMenuId(Integer menuId);

     int deleteObjectsByRoleId(Integer roleId);

     int insertObjects(@Param("roleId")Integer roleId, @Param("menuIds")Integer[] menuIds);

     int findMenuIdsByRoleId(Integer id);
}
